package ioc07;

/**
 * Author:shixiaojun@itany.com
 * Date:2022/3/4 15:58
 * Version:1.0-SNAPSHOT
 */
public class SomeBean {

    private String name;

    public void setName(String name) {
        this.name = name;
    }

//    {
//        System.out.println("代码块,name:"+name);
//    }
//
//    public SomeBean() {
//        System.out.println("构造函数,name:"+name);
//    }

    public void init(){
        System.out.println("初始化,name:"+name);
    }

    public void destory(){
        System.out.println("正在销毁");
    }

    @Override
    protected void finalize() throws Throwable {
        System.out.println("销毁");
        super.finalize();
    }
}
